
import com.hq.model.PmsUser;
import com.hq.service.IPmsUserService;
import com.hq.service.IUserService;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Consumer {
    public static void main(String[] args) {
        //测试常规服务
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("spring-context.xml");
        context.start();
        System.out.println("consumer start");
        IUserService userService = context.getBean(IUserService.class);
        System.out.println("consumer");
        System.out.println(userService.getUserList());

        IPmsUserService pmsUserService = context.getBean(IPmsUserService.class);
        PmsUser pmsUser = pmsUserService.getById(1L);
        System.out.println(pmsUser);
    }
}
